<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@page language="java" pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-16" />

		<title>AGV Software</title>
		<link rel="stylesheet" type="text/css" href="ext/css/ext-all.css" />
		<link rel="stylesheet" id="theme" type="text/css"
			href="ext/css/xtheme-gray.css" />
		<script type="text/javascript" src="/agvWeb/ext/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="/agvWeb/ext/ext-all-debug.js"></script>
		<script type="text/javascript" src="/agvWeb/ext/ext-lang-es.js"></script>

		<link rel="stylesheet" type="text/css"
			href="ext/images/icons/silk.css" />

		<script type="text/javascript">

			Ext.QuickTips.interceptTitles = true;
			Ext.QuickTips.init();			
      		//Si esta imagen no se referencia, la toma de la red
      		Ext.BLANK_IMAGE_URL = 'ext/images/default/s.gif';
      		//para que el autoload permita los scripts de ext
      		Ext.Updater.defaults.loadScripts=true;
      		//para que cada petición se le agrege un numero irrepetible(para IE), esto deshabilita el cache     
      		Ext.Updater.defaults.disableCaching=true;
      
			// La funcion onReady espera a que todo el DOM(Html) se carge completamente, despues de eso podemos renderear paneles    
 			Ext.onReady(function(){
				
				 			
				var loginForm = new Ext.form.FormPanel({
			        standardSubmit: true,
			        frame:true,
			        title: 'Inicio de Sesión',
			 
			        width: 250,
			        bodyStyle: 'padding-top: 5px;',
			        defaultType: 'textfield',
					items: [{
			                fieldLabel: 'usuario',
			                name: 'username',
			                id: 'username',
			                allowBlank:false
			            },
			            {
			                fieldLabel: 'contraseña',
			                name: 'password',
			                inputType:'password',
			                allowBlank:false
			            }
			        ],
			        buttons: [{
			            text: '¿ Olvidó su contraseña ?',
			            height: 25,
			            iconCls:'silk-help',
			            handler: function() {
							loginForm.getForm().getEl().dom.action = 'agvLoginCmd.do?method=login';
					        loginForm.getForm().getEl().dom.method = 'POST';
				            loginForm.getForm().submit();
			            }
			        },{
			            text: 'entrar',
			            height: 25,
			            iconCls:'silk-lock',
			            handler: function() {
							loginForm.getForm().getEl().dom.action = 'agvLoginCmd.do?method=login';
					        loginForm.getForm().getEl().dom.method = 'POST';
				            loginForm.getForm().submit();
			            }
			        }]
			 
			 
			  
			
			
			    });
			 
			    loginForm.render('form-ct');
 
  			});
		</script>
		<script type="text/javascript" src="js/login/login.js"></script>

	</head>

	<body>
		<table align="center" style="height: 100%; width: 100%">
			<tr>
				<td align="center" valign="middle" height="100%">
					<div id="form-ct" style="padding-top: 200px;"></div>
				</td>
			</tr>
		</table>
	</body>
</html>